<?php
if(!empty($listingData))
{
	foreach($listingData as $index => $listing)
	{
		$feed[$index]['title'] = $listing['Listing']['title'];
		$feed[$index]['link'] = $listing['Listing']['viewUrl'];
		$feed[$index]['description'] = "Added by : ".$listing['Listing']['poster']['display_name'];
		$feed[$index]['description'] .= $html->image($listing['Listing']['image'],array('thumb'=>array('crop'=>true,'width'=>150,'height'=>112),'align'=>'right'));
		$feed[$index]['description'] .= $listing['Listing']['description'];
		$feed[$index]['pubdate'] = $listing['Listing']['created'];
	}
	echo $rss->items($feed,'rssFeed');
}else
{
	echo __('No data found!');
}

function rssFeed($feed)
{
	return array(
	'title'=>$feed['title'],
	'link'=>$feed['link'],
	'description'=>$feed['description'],
	'pubDate'=>$feed['pubdate'],
	'guide'=>$feed['pubdate'],		
	);
	
}
?>